package com.cn.service.server.PartsManagement.Impl;

import com.cn.bean.dto.BusinessProjectParameterItemDto;
import com.cn.bean.dto.ComponentSingleRegistrationDto;
import com.cn.bean.pojo.lbj.BusinessProjectSingleParameterItemHistoryDataTable;
import com.cn.bean.pojo.lbj.ComponentSingleRegistrationTable;
import com.cn.bean.pojo.yw.BusinessProjectSingleParameterItemCurrentDataTable;
import com.cn.mapper.dao.db5.PartsManagement.ComponentSingleRegistrationDao;
import com.cn.service.server.PartsManagement.ComponentSingleRegistrationService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ComponentSingleRegistrationServiceImpl implements ComponentSingleRegistrationService {
      @Autowired(required = false)
      private ComponentSingleRegistrationDao componentSingleRegistrationDao;


    @Override
    public List<BusinessProjectParameterItemDto> selectBusinessProjectParameterItem(BusinessProjectParameterItemDto businessProjectParameterItemDto) {
        return componentSingleRegistrationDao.selectBusinessProjectParameterItem(businessProjectParameterItemDto);
    }

    @Override
    public List<ComponentSingleRegistrationTable> selectMain(ComponentSingleRegistrationTable componentSingleRegistrationTable) {
        return componentSingleRegistrationDao.selectMain(componentSingleRegistrationTable);
    }

    @Override
    public List<BusinessProjectSingleParameterItemCurrentDataTable> selectSub(BusinessProjectSingleParameterItemCurrentDataTable businessProjectSingleParameterItemCurrentDataTable) {
        return componentSingleRegistrationDao.selectSub(businessProjectSingleParameterItemCurrentDataTable);
    }

    @Override
    public ComponentSingleRegistrationTable selectUniqueCode(String uniqueCode) {
        return componentSingleRegistrationDao.selectUniqueCode(uniqueCode);
    }

    @Override
    public List<ComponentSingleRegistrationTable> selectComponentSingleRegistrationTable(ComponentSingleRegistrationTable componentSingleRegistrationTable) {
        return componentSingleRegistrationDao.selectComponentSingleRegistrationTable(componentSingleRegistrationTable);
    }

    @Override
    public int insertComponentSingleRegistration(ComponentSingleRegistrationTable componentSingleRegistrationTable) {
        Boolean a=componentSingleRegistrationDao.insertComponentSingleRegistration(componentSingleRegistrationTable);
        if (a){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertCurrentDataTable(BusinessProjectSingleParameterItemCurrentDataTable currentDataTable) {
        Boolean b=componentSingleRegistrationDao.insertCurrentDataTable(currentDataTable);
        if (b){
            return 1;
        }
        return 0;
    }

    @Override
    public int delComponentSingleRegistration(String uniqueCode) {
        Boolean c=componentSingleRegistrationDao.delComponentSingleRegistration(uniqueCode);
        if(c){
            return 1;
        }
        return 0;
    }

    @Override
    public int delCurrentDataTableStatus(String uniqueCode) {
        Boolean d=componentSingleRegistrationDao.delCurrentDataTableStatus(uniqueCode);
        if (d){
            return 1;
        }
        return 0;
    }

    @Override
    public int delCurrentDataTable(String uniqueCode) {
        Boolean e=componentSingleRegistrationDao.delCurrentDataTable(uniqueCode);
        if (e){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertHistoryDataTable(BusinessProjectSingleParameterItemHistoryDataTable historyDataTable) {
        Boolean z=componentSingleRegistrationDao.insertHistoryDataTable(historyDataTable);
        if (z){
            return 1;
        }
        return 0;
    }

    @Override
    public List<ComponentSingleRegistrationDto> selectAll(ComponentSingleRegistrationDto componentSingleRegistrationDto) {
        return componentSingleRegistrationDao.selectAll(componentSingleRegistrationDto);
    }

    @Override
    public List<ComponentSingleRegistrationDto> selectSub(String uniqueCode) {
        return componentSingleRegistrationDao.selectSub(uniqueCode);
    }

    @Override
    public Integer getComponentSingleRegistrationAutoid() {
        return componentSingleRegistrationDao.getComponentSingleRegistrationAutoid();
    }

    @Override
    public Integer getCurrentDataTableAutoid() {
        return componentSingleRegistrationDao.getCurrentDataTableAutoid();
    }

    @Override
    public int updateComponentSingleRegistration(ComponentSingleRegistrationTable componentSingleRegistrationTable) {
        Boolean x=componentSingleRegistrationDao.updateComponentSingleRegistration(componentSingleRegistrationTable);
        if (x){
            return 1;
        }
        return 0;
    }
}
